/*
 * author      : 吴中勤 
 * date        : 2019/1/6
 * description : TODO
 */


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ThreadCheck {

    private static void createBusyThread() {
        Thread t1 = new Thread(() -> {
            while (true)
                ;
        }, "testBusyThread");

        t1.start();
    }

    private static void creatLockThread(final Object lock) {
        Thread t1 = new Thread(() -> {
            synchronized (lock) {
                try {
                    lock.wait();
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }, "testLockThread");

        t1.start();
    }


    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        br.readLine();
        createBusyThread();
        br.readLine();
        creatLockThread(new Object());
    }
}